SomeCoder Posted April 5, 2003 Posted April 5, 2003 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 Quote
Guest mutant Posted April 5, 2003 Posted April 5, 2003 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. Quote
SomeCoder Posted April 5, 2003 Author Posted April 5, 2003 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 Quote
SomeCoder Posted April 5, 2003 Author Posted April 5, 2003 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? Quote
Guest mutant Posted April 5, 2003 Posted April 5, 2003 Sorry I cant help you without seeing how those functions look, and the line the error occurs on. Can you post your project here? Quote
SomeCoder Posted April 5, 2003 Author Posted April 5, 2003 Could You respond to my last post? I appreciate the help Quote
*Experts* Nerseus Posted April 7, 2003 *Experts* Posted April 7, 2003 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 Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Guest mutant Posted April 7, 2003 Posted April 7, 2003 Sorry Nerseus, you a little late :) I resolved this problem with him through PM. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.