By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,706 Members | 2,030 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,706 IT Pros & Developers. It's quick & easy.

error C1083

P: 8
Dear All,

I have several problem about VC++. I succeed to convert Simulink MATLAB to C code using Real-Time Workshop. I am trying to compile a C code using Visual C++ and found the error. Can anyone explain how to solve it?

--------------------Configuration: PROJECT2 - Win32 Debug--------------------
Linking...
RV2AJFRONT_NEW.obj : error LNK2005: _rtM_RV2AJFRONT_NEW already defined in RV2AJFRONT_NEW.obj
RV2AJFRONT_NEW.obj : error LNK2005: _MdlStart already defined in RV2AJFRONT_NEW.obj
RV2AJFRONT_NEW.obj : error LNK2005: _MdlOutputs already defined in RV2AJFRONT_NEW.obj
RV2AJFRONT_NEW.obj : error LNK2005: _MdlUpdate already defined in RV2AJFRONT_NEW.obj
RV2AJFRONT_NEW.obj : error LNK2005: _MdlTerminate already defined in RV2AJFRONT_NEW.obj
RV2AJFRONT_NEW.obj : error LNK2005: _MdlInitializeSizes already defined in RV2AJFRONT_NEW.obj
RV2AJFRONT_NEW.obj : error LNK2005: _MdlInitializeSampleTimes already defined in RV2AJFRONT_NEW.obj
RV2AJFRONT_NEW.obj : error LNK2005: _RV2AJFRONT_NEW already defined in RV2AJFRONT_NEW.obj

Please help me and give me the reason how to repair this errors.

Thank You.
Jan 2 '08 #1
Share this Question
Share on Google+
9 Replies


P: 8
Dear All,

Please help me how to solve it?

--------------------Configuration: PROJECT2 - Win32 Debug--------------------
Linking...
RV2AJFRONT_NEW.obj : warning LNK4006: _rtM_RV2AJFRONT_NEW already defined in RV2AJFRONT_NEW.obj; second definition ignored
RV2AJFRONT_NEW.obj : warning LNK4006: _MdlStart already defined in RV2AJFRONT_NEW.obj; second definition ignored
RV2AJFRONT_NEW.obj : warning LNK4006: _MdlOutputs already defined in RV2AJFRONT_NEW.obj; second definition ignored
RV2AJFRONT_NEW.obj : warning LNK4006: _MdlUpdate already defined in RV2AJFRONT_NEW.obj; second definition ignored
RV2AJFRONT_NEW.obj : warning LNK4006: _MdlTerminate already defined in RV2AJFRONT_NEW.obj; second definition ignored
RV2AJFRONT_NEW.obj : warning LNK4006: _MdlInitializeSizes already defined in RV2AJFRONT_NEW.obj; second definition ignored
RV2AJFRONT_NEW.obj : warning LNK4006: _MdlInitializeSampleTimes already defined in RV2AJFRONT_NEW.obj; second definition ignored
RV2AJFRONT_NEW.obj : warning LNK4006: _RV2AJFRONT_NEW already defined in RV2AJFRONT_NEW.obj; second definition ignored

Thank You
Jan 2 '08 #2

P: 8
Hello,

Please give me reason how to solve this error?

RV2AJFRONT_NEW.obj : error LNK2001: unresolved external symbol _rtP
RV2AJFRONT_NEW.obj : error LNK2001: unresolved external symbol _rtP
RV2AJFRONT_NEW.obj : error LNK2001: unresolved external symbol _rtNaN
RV2AJFRONT_NEW.obj : error LNK2001: unresolved external symbol _rtNaN
Debug/PROJECT2.dll : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

Thank You
Jan 2 '08 #3

P: 62
Hi,
You should have included the lib files twice. Check in the properties.
Jan 2 '08 #4

Savage
Expert 100+
P: 1,764
It seems,that you have multiple variables declared with same name.If you are working with custom header files,make sure you only include them once.To do so you can use preprocessor directive pragma(not recommended,because it's not fully standardized) or you can wrap it inside this set of directives:

Expand|Select|Wrap|Line Numbers
  1. #ifndef __HEADERFILE__
  2. #define __HEADERFILE__
  3.  
  4. /*your code*/ 
  5.  
  6. #endif /*end of header file*/
  7.  
  8. /*or*/
  9. #pragma once /*pragma style*/
  10. /*yourcode*/
  11.  
  12.  


Savage
Jan 2 '08 #5

weaknessforcats
Expert Mod 5K+
P: 9,197
Those symbols are used in the RV2AJFRONT_NEW source file but the symbols are not defined in that file.

You a) have omitted a source file in your build, or b) have omitted to include a the necessary library in your build.

All you have to do is find where the synbols are defined (not declared) and include that resource in your build.
Jan 2 '08 #6

P: 8
Hello,

Sorry, i still have problem again with these error. Give me the solution for these error. Thank You

--------------------Configuration: PROJECT2 - Win32 Debug--------------------
Compiling...
RV2AJFRONT_NEW.c
c:\matlab6p5\work\rv2ajfront_new_grt_rtw\rv2ajfron t_new.c(11) : fatal error C1083: Cannot open include file: 'stdafx.h': No such file or directory
Error executing cl.exe.

PROJECT2.dll - 1 error(s), 0 warning(s)
Jan 3 '08 #7

P: 8
Hi,
You should have included the lib files twice. Check in the properties.
Thank you for your help.
Jan 3 '08 #8

P: 8
It seems,that you have multiple variables declared with same name.If you are working with custom header files,make sure you only include them once.To do so you can use preprocessor directive pragma(not recommended,because it's not fully standardized) or you can wrap it inside this set of directives:

Expand|Select|Wrap|Line Numbers
  1. #ifndef __HEADERFILE__
  2. #define __HEADERFILE__
  3.  
  4. /*your code*/ 
  5.  
  6. #endif /*end of header file*/
  7.  
  8. /*or*/
  9. #pragma once /*pragma style*/
  10. /*yourcode*/
  11.  
  12.  


Savage
Thank you for your help.
Jan 3 '08 #9

P: 8
Those symbols are used in the RV2AJFRONT_NEW source file but the symbols are not defined in that file.

You a) have omitted a source file in your build, or b) have omitted to include a the necessary library in your build.

All you have to do is find where the synbols are defined (not declared) and include that resource in your build.
Thank you very much for your help
Jan 3 '08 #10

Post your reply

Sign in to post your reply or Sign up for a free account.