add images to C++/CLI winform project -Visual studio - c++

whenever I try to add images to imagelist or change the form icon i get an error arround here
this->Icon = (cli::safe_cast<System::Drawing::Icon^>(resources->GetObject(L"$this.Icon")));
the error "System.Resources.MissingManifestResourceException: 'Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "CppCLRWinFormsProject.Form1.resources" was correctly embedded or linked into assembly "BoneJsonEditor" at compile time, or that all the satellite assemblies required are loadable and fully signed.' "
any possible way to fix this ?
i used a tamplate called CppCLR_WinForm project to start my project
after looking it up a bit i found that i sould change the build action but i can't find that field in the file properities

Related

Qt Ubuntu SDK failed to parse plugins.qmltypes

I have a basic App with QML Extension Library app setup with no changes except package identifiers and the similar (email, description, name).
Every time I open app/testApp.qml I get the following error:
Warnings while parsing QML type information of /var/lib/schroot/chroots/click-ubuntu-sdk-14.10-armhf/usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components:
Failed to parse '/var/lib/schroot/chroots/click-ubuntu-sdk-14.10-armhf/usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/plugins.qmltypes'.
Error: /var/lib/schroot/chroots/click-ubuntu-sdk-14.10-armhf/usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/plugins.qmltypes:632:19: Expected string literal to contain 'Package/Name major.minor' or 'Name major.minor'.
/var/lib/schroot/chroots/click-ubuntu-sdk-14.10-armhf/usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/plugins.qmltypes:633:36: Expected array literal with only number literal members.
In addition, and this may be entirely different, when I click the Design button, the system doesn't work and there's an error partially hidden by the right menu. The error is:
The problem is the qml plugin files required are not in the currently specified include directories listed on [projectName].qmlproject in the app project root directory.
I was testing on another project of a different type and I followed these instructions (the project was a QML project with a .qmlproject file).
It was near the bottom of the page, like this:
/* List of plugin directories passed to QML runtime */
importPaths: [ "." ,"/usr/bin","/usr/lib/x86_64-linux-gnu/qt5/qml"]
I ran find / -name *qml* and found something that looked to be a suitable directory, with many items that had a good chance of being qml plugins, so I copied that directory, went to [projectName].qmlproject to the statement posted above and added the directory. The final importPaths statement looks like this:
/* List of plugin directories passed to QML runtime */
importPaths: [ "." ,"/usr/bin","/usr/lib/x86_64-linux-gnu/qt5/qml","/var/lib/schroot/chroots/click-ubuntu-sdk-14.10-armhf/usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/" ]
After doing that, I could open the qml file in designer.
The effect also transferred to my other project, which does not have a .qmlproject file. I'm not sure why. I assume there's some kind of memory of the proper file, although I do not know the specifics.

Android Action bar

I am trying to demo the Android Action Bar and have created an app to try it with. I have installed and linked the library to the project ( I think properly ), and have to the best of my knowledge set it up correctly. The problem though, is that the MainActivity fails to load any of the main resource files.
MainActivity layout:
Create field 'activity_main' in type 'layout'
Menu xml file:
Create field 'menu' in type 'R'
The theme in the Manifest:
No resource found that matches the given name ( at 'theme' with a value
'#style/Theme_appCompat_Light_DarkActionBar')
The main layout and the menu xml both exist, but I admit i don't know where the theme file is to confirm that it exists, though I don't think that is the issue.
I have taken a screenshot that shows the configuration of my projects
The test application and the appcompat folders exist in the same place in the file system, and the build path and library entries all look correct. I can attach screens of those configurations as well if need be.
I feel that this is some kind of configuration error, but i am very new to android development and don't have enough information about the project structure to see where I need to make a change.
Any help would be greatly appreciated.
There seems to be an error in your AndroidManifest.xml. Eclipse won't generate the R ( references file) file until there are no errors in your xml files.
You'll also need the android-support-v13.jar library as that would have some themes in there as well.
If that doesn't work for the theme in the Manifest, you'll need an appropriate themes.xml in your values folder that has the theme name you're looking for. Here's an example:
<!--
the theme applied to the application or activity
-->
<style name="CustomLightTheme" parent="#android:style/Theme.Holo.Light">
</style>

ClCompile and Emscripten

I had a error with a basic hello world from a set of examples from Emscripten/tests/msvc10
I have a error MSB4096 but i don't find the solution of the problem on visual Studio 2012.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuild.targets(817,5): error MSB4096: The item "..\hello_world.c" in item list "ClCompile" does not define a value for metadata "ProgramDataBaseFileName". In order to use this metadata, either qualify it by specifying %(ClCompile.ProgramDataBaseFileName), or ensure that all items in this list define a value for this metadata.
Do you know the reason?
thanks
When trying to compile keep in mind 2 things:
Do no try to compile managed C++ code with emscripten.
the code is running in browser sandbox
The metadata stuff in your code seems really related to the first issue (managed code).
You have to set the 'Program Database File Name' (ProgramDataBaseFileName) Property in the VS C/C++ Options of your Project e.g. to '$(IntDir)$(TargetName).pdb'
ProgramDataBaseFileName exposes the functionality of the compiler's /Fd (Program Database File Name) option.
MSDN ProgramDataBaseFileName

Problem using SimplyVBUnit

I'm having a hard time finding documentation on where I need to put the SimplyVBUnit.dll and SimplyVBUnitUI.ocx files so I can run the tutorial in this question: Gutzofter's mini tutorial on SimplyVBUnit.
Where exactly do I need to reference or register these files so I can create unit tests with VB6?
When I open the source above it says it cannot load SimplyVBUnitUI.ocx and I get the following error in the associated log file:
Line 13: Class SimplyVBUnitUI.SimplyVBUnitCtl of control SimplyVBUnitCtl1 was not a loaded control class.
In order to add the ocx manually, you need to add it to the toolbox then put an instance of the UI control on a form. You will also need a reference to the dll which has the framework. Then make the form the startup object. If you installed SimplyVBUnit using an installer, there is a form in the Projects template folder (frmSimplyVBUnitRunner I think). You can copy that to the Forms templates and just add a new form (the runner form) to the project that will contain your tests.
Have you registered them?
Use Start-Run and run regsvr32 <full-path-to-file>. Repeat this for the OCX and the DLL

C++ Error on compile

I am developing a firewall application which is complete for Windows XP.
To accomplish this, I am creating a dll file, which can be used in C# file.
For Vista or later, I used this code, but it's not compiling. I have win sdk 2008 and it is showing this error:
Error 19 error LNK2019: unresolved external symbol _FwpmEngineOpen0#20 referenced in function "private: unsigned long __thiscall PacketFilter::CreateDeleteInterface(bool)" (?CreateDeleteInterface#PacketFilter##AAEK_N#Z) PacketFilter.obj FirewallVista ".
It must be some project property setting problem because I know all lib files are imported correctly.
It seems like you're trying to compile the simple WFP project from codeproject. The guys above probably didn't understand the questions but the answer was:
find the first function linker fails at and find it on MSDN, eg. FwpmEngineOpen0 and find which library it needs to link to and add it to the project properties / Linker / Input / Additional Dependencies
Actually in the sample, there was another function failing to link UuidCreate
Long story short:
Create a plain Win32 console application (I did it with VS2012) and build it - make sure it works
Add the header file to the project (PacketFilter.h) to the project
Replace the main source file with (PacketFilter.cpp) contents, but don't delete the include for "stdafx.h" on the top of the file
Add the following libraries into the linker section (as per above)
Fwpuclnt.lib
Rpcrt4.lib
Build and run the application (you might need to change the character set to multi-byte too).
You'll have to modify the IP address in the source to make the sample work. I picked a local IP address and did
ping -n 100 192.168.100.200
See the ping returning, start the exe, and see ping failing to reach destination (timing out) - eg. firewall is working. Then press any key to stop firewall and see ping reaching destination again.
I would've posted the link to the codeproject page, but as I have less than 10 credit - I can't :-P
Google for: "Firewall using Vista's Windows Filtering Platform APIs"
Hope this helps anyone who tries to build this sample.
You are missing a library reference. Check that you have imported the .lib that your code is expecting.
EDIT: The missing import is from the library you're talking about itself. That probably indicates you forgot to import the .lib of that actual library, or you need to attach the .cpp files from that project into your own project. In other words, you need more than the headers.
Also, if you're working from .NET, consider using the plain Vista Firewall API because it is already exposed as a COM coclass, which .NET can talk with natively.
Right click on your project name in Solution explorer, select Properties. Then open Linker -> Input. Open the dropdown next to Additional Dependencies select <Edit>. Then type the following in the top textbox:
%(AdditionalDependencies)
$(DDK_LIB_PATH)\NTOSKrnl.lib
$(DDK_LIB_PATH)\FwpKClnt.lib
$(DDK_LIB_PATH)\NetIO.lib
$(DDK_LIB_PATH)\NDIS.lib
$(DDK_LIB_PATH)\WDMSec.lib
$(SDK_LIB_PATH)\UUID.lib