Build problem

Yuan Yu <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.rotor
Message-ID <LISTSERV%[email protected]>
I tried to add some code to src\vm, and call it in src\fjit, but
ran into linking problem. Here is what I did.

In inc\corjit.h, I added:

  int foo(int x);

In vm\jitinterface.cpp, I added:

  int foo(int x) { return x; }

In fjit\fjit.cpp, I added a call foo(3) in the method
FJit::compileCEE_LDFLD.

To build, I typed "build" in the src folder, but got the following
linking error:

Linking Executable - c:\yuan\proj\rotor\sscli\clr\bin\rotor_x86
\checked\mscorejt.dll for i386
fjit.obj : error LNK2019: unresolved external symbol "int
__stdcall foo(int)" (?foo@@YGHH@Z) referenced in function "private: enum
FJitResult __thiscall FJit::compileCEE_LDFLD(enum
opcode_t)" (?compileCEE_LDFLD@FJit@@AAE?
AW4FJitResult@@W4opcode_t@@@Z)

What was wrong with this?  Help is greatly appreciated!

-Yuan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.