Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
Fresh Install, New Project - LINK : fatal error LNK1104
No permission to create posts
March 13, 2017
9:19 pm
Avatar
abeodesee72
Member
Members
Forum Posts: 9
Member Since:
March 13, 2017
sp_UserOfflineSmall Offline

I been get some LNK1104 errors when rebuilding projects, so i re-installed then deleted its %appdata% folder

then i set my default project folder, then created new project

 

uncommented

m_bWantVSTBuffers = true;

 

compiled it fine

 

Creating library C:\Users\user\AppData\Roaming\RackAFX\PlugIns\Test.lib and object C:\Users\user\AppData\Roaming\RackAFX\PlugIns\Test.exp
1> Test.vcxproj -> C:\Users\user\AppData\Roaming\RackAFX\PlugIns\Test.dll
1> Test.vcxproj -> C:\Users\user\Documents\RackAFX\Projects\Test\Test.pdb (Full PDB)

 

i thought it compiled into the project folder ?

 

then i loaded dll, issued rebuild and got the LINK1104 error

 

is it bug ?

March 14, 2017
10:11 am
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

You should not need to do anything to the projects for them to compile/link properly (no need to change any paths).

The m_bWantVSTBuffers flag has nothing to do with compiling/linking. It just chooses the process function that RackAFX will use. 

The destination for the plugin DLL is indeed the ..\AppData\Roaming\RackAFX\PlugIns folder -- this is correct.

Although you didn't post the actual error message, LNK1104 is the "could not open the file for writing" and that can be due to a few different things.

First, the sequence of operations to follow is:

1) open RackAFX

2) open your RackAFX project; RackAFX starts your compiler and loads the Visual Studio solution into it

3) hit the Rebuild button in RackAFX

4) load your plugin to test it, once the rebuild is complete

You can also rebuild directly in Visual Studio. However, if your plugin is still loaded in RackAFX you will get the LNK1104 error. You will need to manually unload the plugin before rebuilding in Visual Studio. This is why I added the Rebuild button - it saves you the unloading step, which is often overlooked when you are debugging quickly.

If you have RackAFX open, but you did not actually open your project in RackAFX (i.e. you opened your Visual Studio project directly), you will get the LNK1104 error (this is because RackAFX, like any other plugin host, loads all the DLLs it finds in its ..\AppData\Roaming\RackAFX\PlugIns folder. Since the DLL is hooked in RackAFX, Visual Studio can not open it for writing).

If you have multiple instances of RackAFX open, you will get this error as one of the other instances will hook the DLL.

In step 2) above, (open your RackAFX project), RackAFX actually unloads the hooked DLL before opening Visual Studio for you, so that you do not get this error.

In step 3) above, (hit the Rebuild button in RackAFX), RackAFX unloads your DLL (if it is loaded in RackAFX) prior to issuing the rebuild command to Visual Studio. 

See the post here about setting up Visual Studio to receive remote rebuild commands:

http://www.willpirkle.com/foru.....d-command/

There is one other way you can get the LNK1104 error - if your plugin does something bad in its destructor, where it does not unload/unhook something, then the DLL can't be unloaded. This only happens to advanced users who are linking to 3rd party libraries, or doing advanced dynamic declarations of arrays, etc... so I am guessing this is not your problem.

Finally, if you want to compile your plugin in x64 mode to work with 64-bit VST2 and VSt3 clients, then you can do that with the Configuration dropdown in Visual Studio. The resulting DLL will be in the project's x64 subfolder and NOT the ..\AppData\Roaming\RackAFX\PlugIns folder. This is because RackAFX is 32-bit and can't load a 64-bit DLL.

- Will

March 14, 2017
12:00 pm
Avatar
abeodesee72
Member
Members
Forum Posts: 9
Member Since:
March 13, 2017
sp_UserOfflineSmall Offline

thank you for taking the time to explain all, but i've used a different project name now and all is ok,

could having a old git repo cause an error like so ?

March 14, 2017
2:01 pm
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

The only thing that could cause this is having the DLL loaded/locked in RackAFX. 

RackAFX identifies your plugin by its name string m_PlugInName (which is identical to the project name). If you have two DLLs with the same internal name it will only load the first one, and will generate a warning for you at startup letting you know it found duplicate plugins.

I think your problem was that you had the plugin loaded in RackAFX, or had multiple instances of RackAFX, when trying to rebuild.

- Will

March 14, 2017
7:12 pm
Avatar
abeodesee72
Member
Members
Forum Posts: 9
Member Since:
March 13, 2017
sp_UserOfflineSmall Offline

the odd thing is it happens with even an un-altered new project, but projects with different names work fine

March 14, 2017
7:41 pm
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

You can always manually delete it, and start all over with that project. From RackAFX choose Plugin -> Open Plugins Folder and then close RackAFX. From the Plugin Folder, delete the DLL that is causing the problem (the original DLL) -- if you don't close RackAFX first, trying to delete it will also result in an error that it "is being used." That is fundamentally the same error as LNK1104 is giving you. 

Then you should be able to start over, open the Project in RackAFX and Rebuild it. It will be guaranteed to rebuild this time because you've removed it. Following the sequence from there should work fine. 

- Will

March 15, 2017
6:07 am
Avatar
abeodesee72
Member
Members
Forum Posts: 9
Member Since:
March 13, 2017
sp_UserOfflineSmall Offline

thanks, but i have a few times manually deleted the the plugin and started other projects without problem, but its when i use target a new default project as the name it causes isuue, it does build and load, but does not unload - and also i can open another project and use other project plugins

March 15, 2017
10:32 am
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

What exactly is the name of the project you are using which causes this issue? Is it "Test?"

I just created a new project named Test without problems - it recompiles correctly and unloads correctly.

- Will

March 15, 2017
3:55 pm
Avatar
abeodesee72
Member
Members
Forum Posts: 9
Member Since:
March 13, 2017
sp_UserOfflineSmall Offline

i use "Target"

March 15, 2017
5:49 pm
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

I just tried it with Target as the name and had no problems - rebuilt it, loaded it, unloaded it, and then rebuilt it again without issues. 

- Will

March 16, 2017
1:25 am
Avatar
abeodesee72
Member
Members
Forum Posts: 9
Member Since:
March 13, 2017
sp_UserOfflineSmall Offline

thanks for taking the time to check, thanks i will investigate further - if i learn anything i will post

Forum Timezone: America/New_York

Most Users Ever Online: 36

Currently Online:
3 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 47

Peter: 41

Derek: 41

clau_ste: 39

Frodson: 38

Gwen: 32

EZB: 24

lppier: 23

Msaldaña: 18

Jorge: 17

Member Stats:

Guest Posters: 1

Members: 477

Moderators: 1

Admins: 4

Forum Stats:

Groups: 11

Forums: 30

Topics: 483

Posts: 1877

Newest Members:

Jaggxn, sam, annaharris, Marie Weaver, kev, Steven, Mr Anderson, mguy, omelc

Moderators: W Pirkle: 143

Administrators: Tom: 65, JD Young: 80, Will Pirkle: 0, W Pirkle: 143