Developer forums (C::B DEVELOPMENT STRICTLY!) > Contributions to C::B
how to include .h and .o (beginners question)
ebl:
i have draw.h and draw.o i have included draw.h but when i compile it i get this anouncment
.objs\LabCTo21.o:LabCTo21.c:(.text+0x114): undefined reference to `InitializeCards'
when InitializeCards() is a func in draw.o declared in draw.h
so what do i need to do in order to include draw.o
thanks
Ceniza:
So you have the .o file but not the original .c/.cpp file...
Try this: Go to Project, Build options..., Linker settings (tab) and add draw.o in Other linker options.
ebl:
it's not working
yes i have draw.o and draw.h
raph:
Please switch Settings->Compiler and Debugger...->Other settings->Compiler logging to Full command line and post the build log.
Biplab:
Do the following.
1) Add draw.o file to project. It will be added to Other section in the project tree.
2) Right click on the draw.o file in the project tree and click on Properties option.
3) Go to Build tab of File properties window and check the Link file option.
This should solve your problem.
Navigation
[0] Message Index
[#] Next page
Go to full version