CharlesVercetti Posted March 17, 2018 Share Posted March 17, 2018 I've installed Code Blocks on my Windows & PC and made all the necessary adjustments to make a plugin(installing Plugin SDK requisites,etc..). The problem is,whenever I try to compile a plugin(in which the c++ code has been correctly sourced under a Plugin SDK project),I get this following error. ||=== Build file: GTAVC Release in test (compiler: GNU GCC Compiler) ===|C:\Users\Abu\Desktop\storieshud_src\plugin-sdk\shared\Error.h||In instantiation of 'static bool plugin::message_gen::msga(const char*, int, const char*, ArgTypes ...) [with ArgTypes = {char*, char*, const char*}]':|C:\Users\Abu\Desktop\storieshud_src\plugin-sdk\shared\Error.h|48|required from 'bool plugin::Error(const char*, ArgTypes ...) [with ArgTypes = {char*, char*, const char*}]'|C:\Users\Abu\Desktop\storieshud_src\plugin-sdk\shared\GameVersion.h|250|required from here|C:\Users\Abu\Desktop\storieshud_src\plugin-sdk\shared\Error.h|19|error: 'sprintf_s' was not declared in this scope|C:\Users\Abu\Desktop\storieshud_src\plugin-sdk\shared\Error.h||In instantiation of 'static bool plugin::message_gen::msga(const char*, int, const char*, ArgTypes ...) [with ArgTypes = {const char*}]':|C:\Users\Abu\Desktop\storieshud_src\plugin-sdk\shared\Error.h|40|required from 'bool plugin::Message(const char*, ArgTypes ...) [with ArgTypes = {const char*}]'|C:\Users\Abu\Desktop\storieshud_src\plugin-sdk\shared\GameVersion.h|257|required from here|C:\Users\Abu\Desktop\storieshud_src\plugin-sdk\shared\Error.h|19|error: 'sprintf_s' was not declared in this scope|||=== Build failed: 2 error(s), 6 warning(s) (0 minute(s), 5 second(s)) ===| Can anyone help? (Forget about the folder path,that's totally irrelevant) Link to comment Share on other sites More sharing options...
DK22Pac Posted March 17, 2018 Share Posted March 17, 2018 Have you completely followed this guide when installing Code::Blocks? Sanmodder and pep legal 2 Link to comment Share on other sites More sharing options...
Sanmodder Posted March 17, 2018 Share Posted March 17, 2018 this plug-in more dedicated to visual studioI also have this problem only I have 50 mistakes CharlesVercetti 1 Link to comment Share on other sites More sharing options...
CharlesVercetti Posted March 17, 2018 Author Share Posted March 17, 2018 Have you completely followed this guide when installing Code::Blocks? I installed Code Blocks which was bundled with the mingw compiler. Does this cause any problem? Link to comment Share on other sites More sharing options...
DK22Pac Posted March 17, 2018 Share Posted March 17, 2018 (edited) Yes, because mingw32 and mingw-w64 are different compiler versions. Edited March 17, 2018 by DK22Pac Link to comment Share on other sites More sharing options...
CharlesVercetti Posted March 17, 2018 Author Share Posted March 17, 2018 (edited) Yes, because mingw32 and mingw-64 are different compiler versions. Thanks for the help _DK.(The offline installable .7z file is available for rev0 only.Online installer keeps crashing) Another question-how do I link the source code of your mobile HUD with the plugin sdk snd compile it? I am continuously getting the "missing plugin.h" error. Edited March 17, 2018 by CharlesVercetti Link to comment Share on other sites More sharing options...
DK22Pac Posted March 17, 2018 Share Posted March 17, 2018 First you need to download MobileHUD source (you can find it on github) and put it to some X folder. Then create a new plugin-sdk project in Code::Blocks, set its location at X folder. And then, add all MobileHUD source files to your project. CharlesVercetti 1 Link to comment Share on other sites More sharing options...
CharlesVercetti Posted March 17, 2018 Author Share Posted March 17, 2018 (edited) Yes, because mingw32 and mingw-w64 are different compiler versions. Yupp...mingw64 has compiled the code successfully.But It seems I can't build a plugin. ||=== Build: GTAVC Release in chhudcol (compiler: GNU GCC Compiler) ===|ld.exe||cannot find -lplugin_vc|||error: ld returned 1 exit status|||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===| Edited March 17, 2018 by CharlesVercetti Link to comment Share on other sites More sharing options...
DK22Pac Posted March 17, 2018 Share Posted March 17, 2018 https://github.com/DK22Pac/plugin-sdk/wiki/Set-up-plugin-sdk#3-build-plugin-sdk-solutionworkspace Link to comment Share on other sites More sharing options...
CharlesVercetti Posted March 17, 2018 Author Share Posted March 17, 2018 https://github.com/DK22Pac/plugin-sdk/wiki/Set-up-plugin-sdk#3-build-plugin-sdk-solutionworkspace Like this? Link to comment Share on other sites More sharing options...
DK22Pac Posted March 17, 2018 Share Posted March 17, 2018 (edited) Like this?No. You've created your project inside plugin-sdk workspace, which is not how you should do it.After you cloned/updated your plugin-sdk copy, open it and build, and you can close it and 'forget' about it (until another sdk update). So when you've built a plugin-sdk workspace, you can close it and create your own plugin. That's how a 'clean' plugin project looks like: Â Edited March 17, 2018 by DK22Pac Link to comment Share on other sites More sharing options...
CharlesVercetti Posted March 18, 2018 Author Share Posted March 18, 2018 That's how a 'clean' plugin project looks like: Â I did as you specified..but stlll the same error persists. ld.exe||cannot find -lplugin_vc|||error: ld returned 1 exit status| Link to comment Share on other sites More sharing options...
DK22Pac Posted March 18, 2018 Share Posted March 18, 2018 (edited) Check if this file exists: Â plugin-sdk\output\mingw\lib\libplugin_vc.aIf it doesn't - try to build plugin-sdk again. Maybe there were some errors during a build? Edited March 18, 2018 by DK22Pac CharlesVercetti 1 Link to comment Share on other sites More sharing options...
CharlesVercetti Posted March 19, 2018 Author Share Posted March 19, 2018 Check if this file exists: Â plugin-sdk\output\mingw\lib\libplugin_vc.aIf it doesn't - try to build plugin-sdk again. Maybe there were some errors during a build? That worked like a charm.Thank you _DK ! Parik 1 Link to comment Share on other sites More sharing options...
pep legal Posted March 30, 2018 Share Posted March 30, 2018 (edited) What about VS2017 ? Â How to import project from GitHub ? Â (I've already built plugin-sdk...and forgot it, as you said). Â Any sugestion for a beginner ? maybe tweak an existent project ! Â (my C experience comes from ARM - using IAR not Visual Studio, my last C++ program was for Win 3.11 - yes....I'm old as hell ) Â I have this so far : Â Edited March 30, 2018 by pep legal Link to comment Share on other sites More sharing options...
Grinch_ Posted March 30, 2018 Share Posted March 30, 2018 is it ok to take more time on code blocks to compile than vs?Its not that much but slightly? Link to comment Share on other sites More sharing options...
DK22Pac Posted March 30, 2018 Share Posted March 30, 2018 (edited) What about VS2017 ?The route for VS is almost same as for CodeBlocks. And if you already have a created project - what's the problem then?  How to import project from GitHub ?If a project is made for VS, you can clone the repo and simply open the .sln file.As another option, you can use Github Extension for VS, click on "Open in Visual Studio" button on GitHub:  https://docs.microsoft.com/en-us/visualstudio/ide/develop-code-in-visual-studio-without-projects-or-solutions https://docs.microsoft.com/en-us/vsts/git/tutorial/clone?view=vsts&tabs=visual-studio   Any sugestion for a beginner ? maybe tweak an existent project !You can check our examples in 'plugin-sdk/examples' folder.  is it ok to take more time on code blocks to compile than vs?Its not that much but slightly?Code::Blocks and Visual Studio use completely differnt building toolchain, so I think it's normal that we have different building time. Edited March 30, 2018 by DK22Pac pep legal 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now