unresolved extern symbol

SomeCoder

Newcomer
Joined
Apr 5, 2003
Messages
5
Thats the error I get when compiling.

A little background. This is a programming assignment for making user level threads. I'm new to C and C++ and am using Visual Studio .Net. The project is to implement some of the code my self such as allocating and initializing the stack and the thread control block, as welling as switching between threads.


I'm trying to use methods such as minithread_system_initialize, minithread_yield , schedule, and fork. I am getting the error message unresolved extern symbol. I have a prototype of these defined in a file and there is a define Minithread_Aux_H.
Not sure what thats for.

My teacher gave us most of the source code and even the function names and paramaters, we just have to fill in the functions. He also gave us a makefile for compiling it from the command line. I would like to use the IDE for debuging and everything esle, but not sure why that error is coming up.
Sorry if I made this sound confusing.

Like I said, I don't know much about C, so any help would be appreciated.

Thanks
 
Does it say what symbol it is?
I mostly get that kind of error when I use Windows App and use main instead of winmain by a mistake.
 
minithread2 error LNK2019: unresolved external symbol _minithread_fork referenced in function _test_thread2

theres the whole error message. And most of the errors are not in the main function

Thanks
 
I wish I knew more about what I was doing. He included an obj file with a header file of the same name ( that included the prototypes for minithread_fork, and the others that I'm getting the error about). I just think I need to get the obj file as part of my project. How would I do that?
 
Sorry I cant help you without seeing how those functions look, and the line the error occurs on.
Can you post your project here?
 
I'm no C/C++ guru either, but my guess is that you need to add the OBJ file somewhere in the project properties so that it gets linked in. Look at the make file and see where the OBJ file is being referenced and hopefully it will give some clues as to where you need to put it in the project properties.

By the way, I thought fork (and maybe multi-thread fork) were unix commands for starting a new thread. Is the OBJ file he gave you compatable with windows? You may want to cbeck on that, too.

-Nerseus
 
Back
Top