Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Guest mutant
Posted

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.

Posted

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

Posted
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?
Guest mutant
Posted

Sorry I cant help you without seeing how those functions look, and the line the error occurs on.

Can you post your project here?

  • *Experts*
Posted

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

"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

Sorry Nerseus, you a little late :)

I resolved this problem with him through PM.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...