Can't compile to windows anymore + cppia issues

torcado194

  • *
  • Posts: 217
So I wanted to try the cppia export but it always returned an error "fatal error C1041." I looked this up and found that some people fixed this issue by installing Visual Studio 2013 (referencing this thread http://www.openfl.org/archive/community/bugs/after-openfl-12-upgrade-invalid-numeric-argument-fs-native-builds/)

So I tried that, and now I can't build to either windows or cppia. When I try to compile Stencyl gives me a dialog box saying "This feature requires Visual Studio 2013 or above." with a prompt to install Visual Studio. I tried doing this, It installed Visual Studios up to 2015, restarted my comp, and it still fails to build on either platform. I've tried it 2 times, and also tried manually installing just the 2013 update, and nothing works.

I'd really like to be able to test my game, and worst case I just do a system restore to before I tried redownloading Visual Studio, but I'd also like cppia to work but I'll probably just make a new thread for that since that isn't my main priority right now.

Thanks for the help

Justin

  • *
  • Posts: 4354
What Visual Studio were you using before? If you upgraded to 2013 from an earlier version, and then to 2015, maybe you just need to install the c++ tools for 2015.

http://community.stencyl.com/index.php/topic,47294.msg265584.html#msg265584

For Live Support: Join our discord server and ping me @justin.
I'm most often available between 8am and midnight Japan time. (GMT+9)

torcado194

  • *
  • Posts: 217
yep that did it, thank you! I was actually running through this as you replied, but it takes my comp 10 years to download any of this stuff. I'm glad that's working now.
cppia still doesn't build though, and I'd like to figure that out. should I start a new topic, or would you have any quick ideas for how to get it working? Logs posted above, but the error seems to be this:
[haxelib.exe] C:/Program Files (x86)/Stencyl/plaf/haxe/lib/hxcpp/hxcpp/project/libs/mysql/my_proto/my_proto.cpp: fatal error C1041: cannot open program database 'C:\Program Files (x86)\Stencyl\plaf\haxe\lib\hxcpp\hxcpp\project\libs\mysql\obj\msvc19-ncxp\vc.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS

Justin

  • *
  • Posts: 4354
I've hit this problem before, but I have no recollection of how I solved it. It may just be a file access thing that can be solved by disabling dropbox or similar services that lock your files for the games-generated folder, or by deleting your game from the games-generated folder and compiling again.

For Live Support: Join our discord server and ping me @justin.
I'm most often available between 8am and midnight Japan time. (GMT+9)

torcado194

  • *
  • Posts: 217
i dont have dropbox or anything similar linked to any stencyl files. I tried deleting the game from the games-generated folder and rebuilding the cppia host and it still gives that error.

torcado194

  • *
  • Posts: 217
alright so ive pretty much combed the internet for any useful response to this issue.
I've tried all of the following:

I tested all of these on a completely blank game with just an empty scene

The error appears to come from one of 3 different files: socket.cpp, my_api.cpp, and mysql.cpp (It seems random which one it happens on, so it could just be coincidence that it stops on one of these three)

So that's all the info I have

« Last Edit: July 03, 2016, 08:33:34 pm by torcado194 »

torcado194

  • *
  • Posts: 217
sorry for the bumps (even though its been 4 days)
I think I understand what's going on now.



The compiler is running a script for cl.exe to run mysql.cpp, my_api.cpp, socket.cpp, and my_proto.cpp at the same time. All of which require "msvc19-ncxp\vc.pdb". According to the internet, the "fatal error C1041" occurs when a file is being accessed by multiple sources (multiple cl.exe instances). The "/FS" tag is supposed to allow this to happen, but doesn't seem to work since all of the  scripts have that flag (as well as "-FS").

I still don't know how to fix this. My best guess for a solution is to make the compiler wait for those files to finish before going to the next one, so that vc.pdb is only accessed once at any time, but I don't have very much knowledge about this. I'm just trying to troubleshoot as best I can.

Justin

  • *
  • Posts: 4354
Returning to the party a little late here, but I just ran into this problem again yesterday, and this is what I did to fix it.

The error mentions the following location:

Code: [Select]
C:\Program Files (x86)\Stencyl\plaf\haxe\lib\hxcpp\hxcpp\project\libs\mysql\obj\msvc19-ncxp\vc.pdb
But when I checked, I found that the referenced file didn't exist. The path stopped at "mysql". So I created the "obj" folder, and inside that, the "msvc19-ncxp" folder. I tried rebuilding cppia again, and this time it threw an error for a different .pdb file. In all, I had to create "obj/msvc19-ncxp" folders for the following hxcpp libs:

Code: [Select]
mysql
regexp
sqlite
std
zlib

After creating those folders, I rebuilt the Cppia host again and it worked. Because this process actually creates the .pdb files in the Stencyl install directory, you will probably need to run Stencyl as an admin before rebuilding the Cppia host.

For Live Support: Join our discord server and ping me @justin.
I'm most often available between 8am and midnight Japan time. (GMT+9)

torcado194

  • *
  • Posts: 217
yesss this totally worked, thanks a lot!