Sign in to follow this  

Compile error (linker error) c++

This topic is 3809 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, this is my first post here on gamedev.net and already my favourite forum. Well, my problem is that i got some compile errors when compiling a client for Open tibia server. I use c++ and compiling with Dev c++ (opengl project if that info is needed) I got these on parameters at Linkers: lib/libglu32.a lib/libopengl32.a lib/libwsock32.a lib/libglfw.a lib/libwinmm.a lib/libgmp.a lib/libgdi32.a -lopengl32 my linker error: [Linker error] undefined reference to `__cpu_features_init'
Compile log:
Compiler: Default compiler
Building Makefile: "C:\Dev-Cpp\Makefile.win"
Executing  make clean
rm -f Tibiaprojekt/Etnoj4/otclient/gui.o Tibiaprojekt/Etnoj4/otclient/guifunc.o Tibiaprojekt/Etnoj4/otclient/items.o Tibiaprojekt/Etnoj4/otclient/main.o Tibiaprojekt/Etnoj4/otclient/map.o Tibiaprojekt/Etnoj4/otclient/networkmessage.o Tibiaprojekt/Etnoj4/otclient/protocol.o Tibiaprojekt/Etnoj4/otclient/rsa.o Tibiaprojekt/Etnoj4/otclient/sprites.o Tibiaprojekt/Etnoj4/otclient/texturemanager.o Tibiaprojekt/Etnoj4/otclient/tile.o Tibiaprojekt/Etnoj4/otclient/client.o  Etnoj4.exe

g++.exe -c Tibiaprojekt/Etnoj4/otclient/gui.cpp -o Tibiaprojekt/Etnoj4/otclient/gui.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"C:/Dev-Cpp/include/c++/3.4.2/backward"  -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"C:/Dev-Cpp/include/c++/3.4.2"  -I"C:/Dev-Cpp/include"   

g++.exe -c Tibiaprojekt/Etnoj4/otclient/guifunc.cpp -o Tibiaprojekt/Etnoj4/otclient/guifunc.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"C:/Dev-Cpp/include/c++/3.4.2/backward"  -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"C:/Dev-Cpp/include/c++/3.4.2"  -I"C:/Dev-Cpp/include"   

g++.exe -c Tibiaprojekt/Etnoj4/otclient/items.cpp -o Tibiaprojekt/Etnoj4/otclient/items.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"C:/Dev-Cpp/include/c++/3.4.2/backward"  -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"C:/Dev-Cpp/include/c++/3.4.2"  -I"C:/Dev-Cpp/include"   

Tibiaprojekt/Etnoj4/otclient/items.cpp: In member function `bool Items::LoadData(const char*)':
Tibiaprojekt/Etnoj4/otclient/items.cpp:116: warning: comparison is always true due to limited range of data type

g++.exe -c Tibiaprojekt/Etnoj4/otclient/main.cpp -o Tibiaprojekt/Etnoj4/otclient/main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"C:/Dev-Cpp/include/c++/3.4.2/backward"  -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"C:/Dev-Cpp/include/c++/3.4.2"  -I"C:/Dev-Cpp/include"   

g++.exe -c Tibiaprojekt/Etnoj4/otclient/map.cpp -o Tibiaprojekt/Etnoj4/otclient/map.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"C:/Dev-Cpp/include/c++/3.4.2/backward"  -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"C:/Dev-Cpp/include/c++/3.4.2"  -I"C:/Dev-Cpp/include"   

g++.exe -c Tibiaprojekt/Etnoj4/otclient/networkmessage.cpp -o Tibiaprojekt/Etnoj4/otclient/networkmessage.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"C:/Dev-Cpp/include/c++/3.4.2/backward"  -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"C:/Dev-Cpp/include/c++/3.4.2"  -I"C:/Dev-Cpp/include"   

g++.exe -c Tibiaprojekt/Etnoj4/otclient/protocol.cpp -o Tibiaprojekt/Etnoj4/otclient/protocol.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"C:/Dev-Cpp/include/c++/3.4.2/backward"  -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"C:/Dev-Cpp/include/c++/3.4.2"  -I"C:/Dev-Cpp/include"   

g++.exe -c Tibiaprojekt/Etnoj4/otclient/rsa.cpp -o Tibiaprojekt/Etnoj4/otclient/rsa.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"C:/Dev-Cpp/include/c++/3.4.2/backward"  -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"C:/Dev-Cpp/include/c++/3.4.2"  -I"C:/Dev-Cpp/include"   

g++.exe -c Tibiaprojekt/Etnoj4/otclient/sprites.cpp -o Tibiaprojekt/Etnoj4/otclient/sprites.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"C:/Dev-Cpp/include/c++/3.4.2/backward"  -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"C:/Dev-Cpp/include/c++/3.4.2"  -I"C:/Dev-Cpp/include"   

g++.exe -c Tibiaprojekt/Etnoj4/otclient/texturemanager.cpp -o Tibiaprojekt/Etnoj4/otclient/texturemanager.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"C:/Dev-Cpp/include/c++/3.4.2/backward"  -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"C:/Dev-Cpp/include/c++/3.4.2"  -I"C:/Dev-Cpp/include"   

g++.exe -c Tibiaprojekt/Etnoj4/otclient/tile.cpp -o Tibiaprojekt/Etnoj4/otclient/tile.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"C:/Dev-Cpp/include/c++/3.4.2/backward"  -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"C:/Dev-Cpp/include/c++/3.4.2"  -I"C:/Dev-Cpp/include"   

g++.exe -c Tibiaprojekt/Etnoj4/otclient/client.cpp -o Tibiaprojekt/Etnoj4/otclient/client.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"C:/Dev-Cpp/include/c++/3.4.2/backward"  -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"C:/Dev-Cpp/include/c++/3.4.2"  -I"C:/Dev-Cpp/include"   

Tibiaprojekt/Etnoj4/otclient/client.cpp: In member function `int Client::GetTime()':
Tibiaprojekt/Etnoj4/otclient/client.cpp:175: warning: converting to `int' from `double'

g++.exe Tibiaprojekt/Etnoj4/otclient/gui.o Tibiaprojekt/Etnoj4/otclient/guifunc.o Tibiaprojekt/Etnoj4/otclient/items.o Tibiaprojekt/Etnoj4/otclient/main.o Tibiaprojekt/Etnoj4/otclient/map.o Tibiaprojekt/Etnoj4/otclient/networkmessage.o Tibiaprojekt/Etnoj4/otclient/protocol.o Tibiaprojekt/Etnoj4/otclient/rsa.o Tibiaprojekt/Etnoj4/otclient/sprites.o Tibiaprojekt/Etnoj4/otclient/texturemanager.o Tibiaprojekt/Etnoj4/otclient/tile.o Tibiaprojekt/Etnoj4/otclient/client.o  -o "Etnoj4.exe" -L"C:/Dev-Cpp/lib" -L"-lopengl32" -mwindows lib/libglu32.a lib/libopengl32.a lib/libwsock32.a lib/libglfw.a lib/libwinmm.a lib/libgmp.a lib/libgdi32.a -lopengl32  

/mingw/lib/crt2.o(.text+0x16a):crt1.c: undefined reference to `__cpu_features_init'
collect2: ld returned 1 exit status

make.exe: *** [Etnoj4.exe] Error 1

Execution terminated

do you need any more information, or anything else, please let me now. im really really sorry if this is wrong forum for this topic, it was the best one i found for this. Edit: tried to use [CODE][/CODE] for the compile log but didint work. thank you, krixen114. :) [Edited by - krixen114 on July 10, 2007 1:05:09 PM]

Share this post


Link to post
Share on other sites
Quote:
Original post by krixen114
Edit: tried to use [CODE][/CODE] for the compile log but didint work.
The equivalent tag on this forum is [source][/source].

Share this post


Link to post
Share on other sites
Looks like you've forgotten to specify the search directories for the OpenGl includes and lirary files.

There should be a setting in your project settings that will allow you to specify these paths.


Share this post


Link to post
Share on other sites

This topic is 3809 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this