ATTENTION

This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices.


flexsim.com

Go Back   FlexSim Community Forum > FlexSim Software > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 06-23-2015
Martin Jensen
Guest
 
Posts: n/a
Downloads: 23
Uploads: 0
Default Failure to compile or open Visual Studio

I have been attempting to convert a model made with flexscript to C++ and compile it to optimize its speed. I have read the description found in

https://www.flexsim.com/community/fo...read.php?t=444

but I am stuck.

I have installed Visual Studio Express 2013 with Flexsim 7.5.4, and I have set up flexsim to enable debugging using visual studio 2013 in the Compile tap of the Global Preferences. However I am still unable to launch Visual Studio from the Build menu -> Open Visual Studio...

Also when I attempt to compile a completely empty model I get the following error message:

"The compiler detected syntax errors. Would you like to open Visual C++? This facilitates checking the syntax."

No matter what I chose next.. nothing happens. The output in the compiler console can be seen below.

I have read through https://www.flexsim.com/community/fo...hp/t-1264.html
But my TEMP/TMP paths have no spaces in them, so thats probably not the same issue.


building...

------------------------------
compiling functions
------------------------------

execute(cl /W0 /MT /EHa /c /nologo /Zi /I "\\cph-file-05\homedir\DK\MBJE\alectia\documents\Projects -Doc\LogiSim _ Joined" /I "C:\Program Files\FlexSim7.5\program\system\include" all.cpp);

------------------------------
linking
------------------------------

creating file: C:\Users\MBJE\AppData\Roaming\Flexsim\FlexSim7\com pile\A\flexsimcontent.dll
execute(LINK /DLL /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /LIBPATH:"C:\Program Files\FlexSim7.5\program\system\lib" /OUT:.\A\flexsimcontent.dll all.obj allobjects.obj GLee.obj @flexbinaries.txt @modelbinaries.txt)

------------------------------
binding
------------------------------
  #2  
Old 06-24-2015
Jason Lightfoot Jason Lightfoot is offline
Flexsim Consultant
 
Join Date: Aug 2007
Location: Somerset, UK
Posts: 719
Downloads: 20
Uploads: 0
Thanks: 123
Thanked 953 Times in 446 Posts
Rep Power: 773
Jason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond repute
Default

In the Global Preferences Compile tab, check you've set the operating system bit level to match your Windows installation (not FlexSim installation)

Last edited by Jason Lightfoot; 06-24-2015 at 10:42 AM.
The Following User Says Thank You to Jason Lightfoot For This Useful Post:
Carsten Seehafer (06-24-2015)
  #3  
Old 07-02-2015
Martin Jensen
Guest
 
Posts: n/a
Downloads: 23
Uploads: 0
Default

Yes, is says Operating System Type, and I am running win7-64bit.
  #4  
Old 07-02-2015
Jason Lightfoot Jason Lightfoot is offline
Flexsim Consultant
 
Join Date: Aug 2007
Location: Somerset, UK
Posts: 719
Downloads: 20
Uploads: 0
Thanks: 123
Thanked 953 Times in 446 Posts
Rep Power: 773
Jason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond repute
Default

That's odd because the symptoms you describe and the console output you had match those you'd get when the incorrect windows bit level is set - resulting in incorrect paths.

In the same preferences compiler tab, you have selected VS2013 Express and not VS2013 I guess?
  #5  
Old 07-03-2015
Martin Jensen
Guest
 
Posts: n/a
Downloads: 23
Uploads: 0
Default

Ok so going over the setting again I have gotten a little bit further. I can now open visual studio from the Flexsim Build Menu, but when switching the model to C++ and trying to compile I still get a lot of errors.

I get a looong list of errors and it stop by saying 'error count exceeds 100; stopping compilation'

These are the first 30 or so lines in the error log:

------------------------------
compiling functions
------------------------------


execute(cl /W0 /MT /EHa /c /nologo /Zi /I "\\cph-file-05\homedir\DK\MBJE\alectia\documents\Projects -Doc\LogiSim _ Joined" /I "C:\Program Files\FlexSim7.5\program\system\include" all.cpp);
all.cpp
all.cpp(7414) : error C2664: 'double Cmd_TankMessage(double,double,double,double,double ,double,double,double,double,double)' : cannot convert argument 1 from 'treenode' to 'double'
There is no context in which this conversion is possible
all.cpp(7440) : error C2661: 'drawcylinder' : no overloaded function takes 13 arguments
all.cpp(7576) : error C2296: '/' : illegal, left operand has type 'double (__cdecl *)(void)'
all.cpp(7638) : error C2296: '/' : illegal, left operand has type 'double (__cdecl *)(void)'
all.cpp(7751) : error C2296: '/' : illegal, left operand has type 'double (__cdecl *)(void)'
all.cpp(7838) : error C2296: '/' : illegal, left operand has type 'double (__cdecl *)(void)'
all.cpp(7876) : error C2296: '/' : illegal, left operand has type 'double (__cdecl *)(void)'
all.cpp(7914) : error C2296: '/' : illegal, left operand has type 'double (__cdecl *)(void)'
all.cpp(7947) : error C2296: '/' : illegal, left operand has type 'double (__cdecl *)(void)'
all.cpp(7996) : error C2440: 'return' : cannot convert from 'treenode' to 'double'
There is no context in which this conversion is possible
all.cpp(8022) : error C2440: 'return' : cannot convert from 'treenode' to 'double'
There is no context in which this conversion is possible
all.cpp(8048) : error C2440: 'return' : cannot convert from 'treenode' to 'double'
There is no context in which this conversion is possible
all.cpp(8072) : error C2296: '/' : illegal, left operand has type 'double (__cdecl *)(void)'
all.cpp(8130) : error C2664: 'double Cmd_SetTankState(double,double,double,double,doubl e,double,double,double,double,double)' : cannot convert argument 1 from 'treenode' to 'double'
There is no context in which this conversion is possible
all.cpp(8133) : error C2440: 'initializing' : cannot convert from 'double' to 'treenode'
all.cpp(8142) : error C2664: 'double Cmd_SetTankState(double,double,double,double,doubl e,double,double,double,double,double)' : cannot convert argument 1 from 'treenode' to 'double'
There is no context in which this conversion is possible
all.cpp(8146) : error C2664: 'double Cmd_TankTransfer(double,double,double,double,doubl e,double,double,double,double,double)' : cannot convert argument 1 from 'treenode' to 'double'
There is no context in which this conversion is possible
all.cpp(8158) : error C2664: 'double Cmd_TankTransfer(double,double,double,double,doubl e,double,double,double,double,double)' : cannot convert argument 1 from 'treenode' to 'double'
There is no context in which this conversion is possible
all.cpp(8172) : error C2440: 'return' : cannot convert from 'TreeNode *' to 'double'
  #6  
Old 07-03-2015
Jason Lightfoot Jason Lightfoot is offline
Flexsim Consultant
 
Join Date: Aug 2007
Location: Somerset, UK
Posts: 719
Downloads: 20
Uploads: 0
Thanks: 123
Thanked 953 Times in 446 Posts
Rep Power: 773
Jason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond repute
Default

In Visual Studio, is the solution platform set to x64 ?
The Following User Says Thank You to Jason Lightfoot For This Useful Post:
arunkrmahadeva (07-03-2015)

Tags
c++, debugging, syntax error, visual studio


Thread Thread Starter Forum Replies Last Post
How to set up C++ debugging in Visual Studio for Flexsim5 Hao Zhou Q&A 2 12-23-2011 11:55 PM
How to set up C++ debugging in Visual Studio Anthony Johnson Wiki Articles 8 12-22-2011 11:20 AM
Visual Studio Express 2008 Nico Zahn Installation 2 07-01-2008 04:19 AM
Visual Studio 2005 or 2008? Lars-Olof Leven Q&A 16 01-02-2008 12:10 PM
Visual Studio 2005/VISTA David Chan Q&A 1 01-01-2008 03:51 AM


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.