question

Aditya Prakash avatar image
1 Like"
Aditya Prakash asked Joerg Vogel commented

How to Compile Flexsim model ?

Hi, which "Additional Include Directories" & "Additional Dependencies" should be added to a flexsim project to compile the project? (Flexsim 16.1.1)

It would be great if someone can write down a guide for compiling a flexsim project .

FlexSim 16.1.1
compilecompilerglobal preferences
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Matt Long avatar image
2 Likes"
Matt Long answered

If you open up the Compiler Console (Debug menu), and then try and compile you'll probably get an error like this:

fatal error C1083: Cannot open include file: 'windows.h': No such file or directory

This error is because Visual Studio 2015 doesn't install everything you need if you're not running on Windows 10. You'll need to install the Windows Software Development Kit (SDK)

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Matt Long avatar image
2 Likes"
Matt Long answered Aditya Prakash commented

The only setup you need to do in order to compile FlexSim is to set your Compiler settings in Global Preferences.

Open Global Preferences from the Start Page or the File Menu. Click on the Compiler tab. You'll need to set the compiler settings based upon your system and which version of Visual Studio you have. This will allow FlexSim to use Visual Studio to compile your model.


· 5
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Aditya Prakash avatar image Aditya Prakash commented ·

@Matt Long I did that, but because it prompts "The compiler detected syntax errors." I open up the project in Visual Studio Community 2015, to identify the syntax errors. But It seems I need to add to dependencies as well. I'm unsure of which files need to be linked.

0 Likes 0 ·
Matt Long avatar image Matt Long Aditya Prakash commented ·

Can you post the errors the compiler is giving you? I don't get any issues when compiling.

What happens when you do Compile Entire Session?

0 Likes 0 ·
Aditya Prakash avatar image Aditya Prakash Matt Long commented ·
0 Likes 0 ·
compile-issue.gif (336.8 KiB)
capture1.png (44.7 KiB)
mark.gormley avatar image mark.gormley commented ·

If the model compiles in Visual Studio and not inside FlexSim then then try and do a compile entire session instead (Build > Compile Entire Session). I believe this is needed whenever the compiler settings are changed. After this you should be ok with just a normal compile

0 Likes 0 ·
Aditya Prakash avatar image Aditya Prakash mark.gormley commented ·

@mark.gormley Already tried that, to no avail.

0 Likes 0 ·
Craig DIckson avatar image
0 Likes"
Craig DIckson answered Joerg Vogel commented

Can I second the request for step by step instructions, or at least something a bit more detailed than what seems to exist now?

Also, would I be right in assuming that I need to have purchased and installed Visual Studio separately before I can compile a model (i.e. the compiler does not come with FlexSim)?

Thanks, Craig

· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Joerg Vogel avatar image Joerg Vogel commented ·

yes, in a commercial environment. In the history of Flexsim was this absolutely normal. In the past Flexsim hasn't got precompiled objects. Each model run had to be compiled.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.