G++ undefined reference errors

So I'm trying to do an assignment, we have to make a driver and use some functions from the teachers library they have made.

he provides us with a header file and an obj file.

but when ever i try compile I get undefined reference error which is a linker issue, leading me to believe its not linking the provided obj file, anyone have experience with this?

I guess, it is probably not linking properly. Could you please send your source code as well as the error and the compile line?

It doesn't link the object file automatically, you have to tell it. Something like g++ -o output object_file.o source.cpp

I'm using G++ on windows if that makes any difference, the current flags are myfile.cpp -o myfile.exe -staticlibgcc -staticlibc++

*its an obj file and putting it along side the source.cpp even before the source.cpp doesn't seam to do anything

Ok, you got a real output. My g++ -o main3.exe utilities.obj display_ascii2.cpp outright segfaulted on several attempts. And I think the reason is that the .obj file is in COFF(?) format and is supposed to be used with MS Visual C++. I don't know if it can be somehow linked with gcc, but I don't think so.

Also, the demo app included complains it needs MSVC12 to funcion, so I would just use that to compile it.

makes sense..... my school loves M$, rip guess I have to go with the flow and just use visual studio