Commit 38409f22 authored by guillaume's avatar guillaume

stdio.h

parent 903f9d60
...@@ -2,7 +2,10 @@ project(networld LANGUAGES C) ...@@ -2,7 +2,10 @@ project(networld LANGUAGES C)
cmake_minimum_required(VERSION 3.10) cmake_minimum_required(VERSION 3.10)
# Activate C99 standard: # Activate C99 standard:
SET(CMAKE_C_FLAGS "-std=c99 -Wall -Wextra" ) SET(CMAKE_C_COMPILER "gcc" )
SET(CMAKE_C_FLAGS "-std=c99" )
set(CMAKE_CXX_FLAGS_DEBUG_INIT "-Wall -Wextra")
set(CMAKE_CXX_FLAGS_RELEASE_INIT "-Wall")
# project configuration : # project configuration :
include_directories(${PROJECT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/src) include_directories(${PROJECT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/src)
...@@ -11,7 +14,7 @@ include_directories(${PROJECT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/src) ...@@ -11,7 +14,7 @@ include_directories(${PROJECT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/src)
find_package(raylib 3.0 REQUIRED) find_package(raylib 3.0 REQUIRED)
#set(raylib_VERBOSE 1) #set(raylib_VERBOSE 1)
add_executable(nw-hello src/hello.c) add_executable(nw-hello src/main-hello.c)
target_link_libraries(nw-hello raylib) target_link_libraries(nw-hello raylib)
add_executable(nw-viewer src/main-viewer.c src/networld.c) add_executable(nw-viewer src/main-viewer.c src/networld.c)
......
...@@ -15,4 +15,7 @@ mkdir build && cd build ...@@ -15,4 +15,7 @@ mkdir build && cd build
cmake -DSHARED=ON -DSTATIC=ON .. cmake -DSHARED=ON -DSTATIC=ON ..
make make
sudo make install sudo make install
cd .. cd ..
\ No newline at end of file
# NetWorld:
bin/build
\ No newline at end of file
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include "networld.h" #include "networld.h"
#include "raylib.h" #include "raylib.h"
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h>
// Program attributes // Program attributes
//------------------- //-------------------
......
...@@ -14,7 +14,7 @@ typedef struct Str_NetWorld NetWorld; ...@@ -14,7 +14,7 @@ typedef struct Str_NetWorld NetWorld;
// Constructor / Destructor // Constructor / Destructor
NetWorld * NetWorld_new(int aSize); NetWorld * NetWorld_new(int aSize);
void NetWorld_delete(NetWorld * aWorld); void NetWorld_delete(NetWorld * self);
// Initialization // Initialization
void NetWorld_initNodePosition(NetWorld * self, int iNode, double x, double y); // position must be an float[size][2] array... void NetWorld_initNodePosition(NetWorld * self, int iNode, double x, double y); // position must be an float[size][2] array...
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment