question

Arun Kr avatar image
2 Likes"
Arun Kr asked Mischa Spelt commented

DLL Maker Error

Hi,

Building DLL on the FlexSim DLL maker in visual studio 2017 brings down the following error attached(I didn't write any new functions, only default ones). It notifies to install v120_xp toolset or retargeting the solution. Even after doing this, the same message appears.

Any idea ? Or Is it better to use visual studio express 2013 or 2015? Or Am I missing something?

Regards,

Arun KR

FlexSim 19.1.1
dll
error-disp.png (98.0 KiB)
· 2
5 |100000

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

Steven Hamoen avatar image Steven Hamoen commented ·

@Arun KR I do see in the screenshot you are compiling for 32 bits. Is that correct?

0 Likes 0 ·
Arun Kr avatar image Arun Kr Steven Hamoen commented ·
0 Likes 0 ·

1 Answer

Mischa Spelt avatar image
3 Likes"
Mischa Spelt answered Mischa Spelt commented

It should be enough to change the project toolset to one that you do have installed. For Visual Studio 2017 this is the v141. You can set it in the project properties:

Be aware that this change is saved in the .vcxproj so if you check this in to version control the next user to open it in Visual Studio 2013 will have the same issue in reverse.


toolset.png (41.2 KiB)
· 4
5 |100000

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

Arun Kr avatar image Arun Kr commented ·

Thanks Misha

0 Likes 0 ·
Arun Kr avatar image Arun Kr commented ·

I am facing some issues while building DLL with visual studio 2019 version.

Here's the error message.

Anyone having the same issues ?

0 Likes 0 ·
v2019.png (113.0 KiB)
Phil BoBo avatar image Phil BoBo ♦♦ Arun Kr commented ·

I don't have VS2019 installed to test it (we're still using VS2017), but you can change declaration.h in your solution.

Change how it defines fabs() and round() so that it compiles. Or just take out the declaration of fabs() and round() so that it doesn't try to connect to versions of those functions.

Those function declarations are there in order to maximize compatibility with FlexScript functions (by making all the FlexSim commands available). If you aren't using fabs() or round(), you don't need to define them.

You can change your declaration.h in the DLL Maker to suit your needs for the DLL you are trying to build.

0 Likes 0 ·
Mischa Spelt avatar image Mischa Spelt Phil BoBo ♦♦ commented ·

I've compiled a few modules in VS2019 and did not see this issue. So there is more to it than just the upgrade from '17 to '19.

0 Likes 0 ·