User forums > Using Code::Blocks

must add a file to my project [SOLVED]

<< < (2/2)

Miguel Gimenez:

--- Quote ---I Believed adding the instruction #include and set a path to the file was enough. That is not enough ?
--- End quote ---

The include just informs the compiler about the existence of some functions and how they expect to be called. The functions themselves are in the cpp file, so you must attach (link) the code containing the functions to your project using one of the two methods I wrote before.


--- Quote ---I don't need to add the file glm.cpp in my project unlike shader.cpp
--- End quote ---

You don't need glm.cpp probably because you are not using the functions it contains, or they are already included in one of the libraries you are linking:


--- Code: ----lOpenGL32 -lglu32 -lfreeglut -lglew32 -lglew32mx -lglfw3dll  C:\msys64\mingw64\lib\libfreeglut_static.a C:\msys64\mingw64\lib\libfreeglut.a C:\msys64\mingw64\lib\libglfw3.a
--- End code ---

bbd:
Thks Miguel
Crystal clear.

Navigation

[0] Message Index

[*] Previous page

Go to full version