How to I get my application to reference a dll instead of X.dll - c++

I am trying to deploy an application to a target machine and am getting a side-by-side configuration error. I traced it and found that the application is trying to reference AxisMediaControl.X.dll instead of AxisMediaControl.dll. I recently converted to a new version of Embarcadero (10 Seattle) and assume I've missed something in my config. Let me know how I can remove this extra X in the filename in the reference path.
Thanks!

I forgot on this project I created a custom manifest file....I must include that manifest file with the deployment. It's always tough coming back from Christmas break. Problem solved.

Related

Xcode says "You don't have permission" when trying to run. Tried a lot of solutions from here [duplicate]

Whenever I try to run my app in Xcode 6 Beta 4 I am getting the error:
The file "MyApp.app" couldn't be opened because you don't have permission to view it.
This error appears no matter what simulator or device I target.
I have tried:
Deleting all Derived Data from Organizer in Xcode
Repairing permissions on my drive
Manually elevating the permissions of the built MyApp.app
Restarting my computer
Has anyone else run into this problem and found a solution?
I use Xcode6 GM. I encountered the same problem. What I did was to go to Build Settings -> Build Options. Then I changed the value of the "Compiler for C/C++/Objective-C" to Default Compiler.
Having the problem on DEVICE too (not just simulator)?
The other solutions only fixed it for me on simulator, not device.
For me this problem occurred (in Xcode 6) when I would try to change the main info.plist properties whilst trying to change my app name.
In info.plist I had changed Executable File name to something other than the default ${EXECUTABLE_NAME}...
I had mistaken this field for the field that changes the name of the app under the icon on the springboard.
In Xcode do the following
Window --> Organiser --> Projects --> The app with the issue --> delete button in Derived Data.
I then cleaned the project and voila
works
For me, a simple Product -> Clean worked great
I've fixed it by cleaning a build folder. Just went to 'Product' menu and Option+Click 'Clean'. After that a problem was resolved.
There was a problem with the Info.plist of the project. I created a new project with the same name in Xcode 6 beta 4 and then replaced the real project's Info.plist with the new one. The project then built and ran fine.
Look at the diff, it appears like the plist might have somehow gotten mixed up with a playground's plist. The bundle identifier was "com.apple.dt.playground.iOS-18300-13" and the executable and bundle names were "iOS" along with some other oddities.
This is the full diff in case anyone needs it for reference:
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
- <string>iOS</string>
+ <string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
- <string>com.apple.dt.playground.iOS-18300-13</string>
+ <string>com.myCompany.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
- <string>iOS</string>
+ <string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
- <string>AAPL</string>
+ <string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
- <key>CFBundleSupportedPlatforms</key>
- <array>
- <string>iPhoneSimulator</string>
- </array>
+ <key>CFBundleSignature</key>
+ <string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
- <key>DTPlatformName</key>
- <string>iphonesimulator</string>
- <key>DTSDKName</key>
- <string>iphonesimulator8.0</string>
- <key>LSBackgroundOnly</key>
- <true/>
<key>LSRequiresIPhoneOS</key>
<true/>
+ <key>UIMainStoryboardFile</key>
+ <string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
</dict>
</plist>
I've had same this error in Xcode 8.2. The reason I found out for me, another Info.plist is added in my project while adding library (manually copy).
So that Xcode is getting confused for selecting correct Info.plist.
I just removed that Info.plist from the added library.
Then it is working fine without any permission alert.
Please check if you have changed Executable file => $(EXECUTABLE_NAME) to any other name. If you have changed this name then it shows this error. Please replace it with $(EXECUTABLE_NAME).
Product -> Clean (command shift K) fixed it for me
My goodness!! I spent hours to resolve this issue.
On XCode 7.3 I was having project with no issues.
Mistake I did
I just Added physical folders and moved my files into them, problem started.
I tried everything
Default compiler
Clean and build
Reset simulator and reboot simulator, Xcode, iPhone even mac
Updated Info.plist
Deleting Derived Data
Editing the permission on the folder of the project
Checking my architectures
nothing worked :(
How I resolved
I was about create new project and then I just deleted those physical
folders I added, clean build and YESS!!
It works!!
Try "cmd+shift+k" to clean the project and rebuild. At least it worked for me
Sometimes opening old project in new version Xcode will get this message.
Go to Issue navigator and follow the warning hint 'Upate to reconmmented settings'.
Boom, magic!
I had similar issue (xCode 6.2) for sample code downloaded. I tried to set Executable Name to Default in Info.plist but this didn't worked.
Instead change Compiler for C/C++/Objective-C to Default compiler (Apple LLVM 6.0) instead of Unsupported Compiler(com.apple.compilers.llvmgcc42) for project.
My Application was working fine on XCode 9.4, but when I opened my project in XCode 10 I was experiencing this issue. For me the issue was the build setting. I found the answer in this page https://forums.developer.apple.com/thread/112141.
In short go to File > Workspace Settingsā€¦ > Build System and change it to "Legacy Build System"
1) Go Firstly Build Options.
2) Then changed the value of the "Compiler for C/C++/Objective-C" to Default Compiler.
clean and working :-)
I found that changing my compiler to LLVM 6.0 in the Build Options was enough for me (xcode 6.1)
I got same error on my Xcode 6.1.1 for a project downloaded from gitHub which was committed 4 years ago.
For me, setting Architectures to the default value Standard architectures(armv7,arm64) and Compiler for C/C++/Objective-C to Default Compiler in Building Settings worked.
I had the same issue in my project. Later on found that third-party (fmdb for SQLite) file used in project contained Info.plist.
Simply deleting the Info.plist file worked for me!
I recently meet the same problem for running an old project (initially created in Xcode 4.x) in Xcode 6.0.1.
I fixed the problem by changing the Architectures in Building Settings to the default value, which is "Standard architectures(armv7,arm64)".
Hope this could help anyone who got similar problems :)
I've had this error with a number of my older projects that I am getting out of the cupboard to update. It seems that using Xcode 6 with older code seems to bring this about for some reason.
I have fixed this in all projects that I have done this with by:
Delete Derived Data
in Product: do a clean
go to Build Settings in the project Target and go to Build Options and change the value of the "Compiler for C/C++/Objective-C" to 'Default
Compiler'.
I tried all of the listed answers and none of them was useful. The problem was due to existence of an another plist file linked from a submodule via cocoapods. Luckily this was my own module, so I just deleted this plist from the submodule project and reinstalled pods.
solution
Later on I understood that the key of the problem was in the name of that second plist: simply info.plist. You may rename the file and relink it via a sources section of a submodule
That second plist file had a unique name, so Xcode was not supposed to become frustrated. Even my target settings pointed on a main plist, not on a info.plist. Looks like Xcode takes special consideraions about that name
The bug reproduced in Xcode 6.4 and Xcode 7.0
Well in my case, I just rename the Bundle Name and Executable file values in info.plist same as project name. It worked for me.
What I did is here:
I deleted VALIDARCHS from Project
I deleted VALIDARCHS from Target
Build Active Architecture Only = YES (for Debug) Architectures
Standard Architectures $(ARCHS_STANDARD)
Also, File -> Project/Workspace Settings == New Build System
Xcode Version 12.0 (12A7209)
I had this similar problem. Somehow my value for the key Executable File got mixed up. Just change it back to ${EXECUTABLE_NAME} (Under your project > Info). Worked for me!
If you google the text of this error message you will find maybe 20 threads across StackOverflow, Apple dev forums, Reddit, etc. about Xcode failing to be able to run a compiled executable with this error message.
In these threads you will find many people offering various suggestions about how to fix the problem: changing product name to match project name, changing build phase options, something with info.plist, changing compilers to or from Clang, etc. Presumably the suggestions are offered in good faith because they solved the problem for someone, but the answers are so varied that it is clear that the error message is generic and this is an important point if you are receiving it: this error seems to mean that something is wrong with the binary. Ignore its actual text: it may have nothing to do with permissions.
There is no general solution to this error. The error message is totally generic; assume it means "bad binary file". The solution if you are receiving it depends on what you are trying to do, what has changed, why you are seeing this error all of a sudden. Google the specifics of your situation rather than this error message.
In my case, and I have a feeling this is a common case, what I was trying to do was build an old iOS project, nine years old I think, on modern Xcode. The solution was to switch to the legacy build system which led to a compilation error because in the old project there were not modern architecture targets, which could be fixed by manually adding them.
In my case main.m containing the main(...) function was not contained in the list of "Compile Sources" in "Build Phases". To check if this is the case, enter into Build Phases and look, if your main.m appears in the "Compile Sources" list.
Don't know if the problem is related but maybe it can be a solution for anyone pulling the hairs like me.
In my case, I have a project with a lot of targets. Each target is a customisation of that base project which is a Cocoa Touch Static Library and the targets, Applications. Even if the main file is added into the library compilation, but not in each target, that error message appears. So what I did? Manually added the main file to each target in the Compile Sources section and bingo, all fine.
For me the error was in the .plist file at the key CFBundleExecutable.
I had renamed the executable removing a space that was between two words. (Eg: from "Wild Racer" to "WildRacer"). Took 1 day to spot it!!
Xcode is soooo unhelpful in the debugging!
What solved it for me was setting Build Active Architecture Only from No to Yes.
with X-code 6.3.2
[Build Settings] Options.
[All]-[Build Options]-[Compiler for C/C++/Objective-C]-[Default compiler (Apple LLVM 6.1)]
Then rebuild the project, and it runs ok.

Changing name of application file (.C file)

I changed the name of an modified application to seperate it from the basic application. Lets say the .C file of the old application is "OldApplication.C" and of the new modified one is "NewApplication.C" Unfortunately, when trying to start the new modified application in terminal by typing "NewApplication" I get:
NewApplication: command not found
Two Question:
How can I make my new application executeable?
Can someone give me a brief overview about the files of a project/application and their functions?
greetings, streight
The mistake of this kind
make: * No rule to make target OldApplication.dep', needed byMake/linuxGccDPOpt/dependencies'. Stop.
often occurs in situation when the Makefile ceases to comply with the structure of the whole project.
In your case make script obviously trying to find the file that was renamed by you and therefore it fails with en error. I think that you should explore the structure of your Makefile and replace all the changed file names with its new versions.
Also you say the you are refused to launch your new executable, but what else could be expected since the project was not compiled?

Environment variables in Visual Studio 2013

I'm trying to set my project include to the path %OPENCV_246%\..\..\include
This resolves to the path F:\dev\opencv_246\build\include
However, when setting the project includes, that path will not resolve and as a result the included headers break.
I've tried both %OPENCV_246%\..\..\include and $(OPENCV_246)\..\..\include with no luck.
Using the path directly fixes my includes, but I'd like to have a better way of managing the path through environment variables.
In the screenshot I've added both for clarity, If anyone could point out the step I'm missing here I'd appreciate it.
EDIT: Variable OPENCV_246 contains value F:\dev\opencv_246\build\x86\vc11
Dev studio won't recognize any environment variables that have been changed since it was started, so if you change one, a restart is required (of Dev studio, not the computer).
https://superuser.com/questions/107521/why-are-changes-to-my-path-not-being-recognised
This sounded similar to my problem, which was getting VS2013 to acknowledge a change I made to my environment variable (in my case QTDIR). Even after a restart and a shutdown, it obstinately hung on to the old value !! (you can see the value if you go to edit a project setting, hit the "Macros" button, and scroll down the list to find e.g. "$(QTDIR)" )
Here it suggest VS2010 cahed values heavily, but 2013 seems even more keen !
After some FindInFiles for the old path, it seems that VS2013 caches environment variables in your .vcxproj.user file. I have no idea how it got in there in the first place.
So I deleted the entry, closed the solution, checked the file again in WordPad to make sure the entry hadn't been put back in. Then I re-opened the solution, but the old value was still there in the Macros list !
Closing VS seems to have done the trick. Now it seems to have the right path - although I'm sure I checked after I first opened the solution and QTDIR wasn't in the Macros list at all - maybe I'm confused...
Well, it all seems to be working now, and my project builds and links to my Qt libs without complaints :-)
And, the entry in the vcxproj.user file hasn't come back. So I still don't know how it got in there. Maybe I did something to cause it a while back in a previous version of VS...

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

Can I create a cross-project source reference in redmine?

If you have two separate projects that is somehow connected. How can one make a reference to the source of the other project?
For referencing the source of your own project you use:
source:some/file
But since I want to refer to code in another project my thought was that I could write something like:
other_project:source:some/file
Anyone that knows if this is possible in some way? I have read http://www.redmine.org/wiki/redmine/RedmineTextFormatting#Redmine-links but found no clues there.
Apparently this was implemented in Redmine 1.2.0 (released 2011-05-30). The syntax is exactly the one you suggested in the question, other_project:source:some/file, other_project being the project identifier.
It is possible in a couple of ways - although neither solution is particularly neat.
use an external html link to the other_project source code, where other-proj is the identifier for the other project.
"other project source":http://myserver:3000/projects/other-proj/repository/entry/file.txt
define the source path via the parent directories, so from the source directory of your current project go up 3 directory levels before navigating back down to the repository of your other project. Note the source link needs to be inside double quotes to work. This method at least keeps the source tag at the front of the link.
source:"../../../other-proj/repository/entry/file.txt"
The Redmine Text Formatting page says the format is:
source:repo_identifier|some/file
Even so, the selected answer works for my version of Redmine (1.4.2), but it may have been changed in later versions. This link format was added to that wiki page on 2012-08-27, after OP asked their question.